/**
 *
 *
 *@Auther z.b
 *@date 2016/9/9 14:18
 *@Email:2545375@qq.com
 *@since 1.0
 *
 */
module.exports = {
    '/antd/todo': function (req, res) {
        console.log(req.query);
        var data=[
                    {
                        id:1,
                        loginName: 'zhengbiao',
                        trueName: '郑伟',
                        email:'25454@asd.com',
                        callNum:'234234234',
                        createTime:'2016-09-16 14:23:21'
                    },
                    {
                       id:2,
                        loginName: 'zhengbiao',
                        trueName: '郑伟',
                        email:'25454@asd.com',
                        callNum:'234234234',
                        createTime:'2016-09-16 14:23:21'
                    }
                ];
        if(req.query){
                var query=req.query;
                if(query.loginName){
                   data=data.filter((obj)=>{
                        return obj.loginName===query.loginName;
                    })
                }
        }
        console.log(data);
        setTimeout(()=> {
            res.json({
                success: true,
                total:2,
                pageSize:5,
                list:data
            });
        }, 500);
    },
}
